package com.xiaoshuidi.cloud.module.member.api.index;

import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.member.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.security.PermitAll;

@FeignClient(name = ApiConstants.SERVERNAME)
public interface AppIndexApi {

    String PREFIX = ApiConstants.PREFIX + "/app-config";

    @PermitAll
    @GetMapping(PREFIX + "/index-config")
    @Parameters({
            @Parameter(name = "lat", description = "纬度"),
            @Parameter(name = "lon", description = "经度"),
            @Parameter(name = "apartmentId", description = "门店ID"),
    })
    @Operation(summary = "APP首页配置-获取配置")
    public CommonResult<Object> getIndexConfig(@RequestParam("id") Integer id,@RequestParam(value = "lat", required = false) String lat,@RequestParam(value = "lon",required = false) String lon,@RequestParam(value = "apartmentId", required = false) Long apartmentId);
}
